<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Generate a PDF from the input HTML string
 *
 * @param html: the HTML string to render in a PDF file
 * @param pdfname: the name of the PDF that is going to be streamed
 * @access	public
 */	
if ( ! function_exists('streampdf'))
{
	function streampdf($html, $pdfname)
	{
		require_once('dompdf6/dompdf_config.inc.php');		
		$dompdf = new DOMPDF();
		$dompdf->load_html($html);
		$dompdf->render();
		$dompdf->stream($pdfname.'.pdf');
	}
}
